package com.htsk.city.services.wechat.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.htsk.city.services.core.domain.Technician;
import com.htsk.city.services.core.domain.TechnicianAvailability;
import com.htsk.city.services.core.domain.TechnicianServiceRanges;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author 李树洪
 * @Email 2324592742@qq.com
 * @Date 2025/9/8 19:58
 */
@Data
public class TechnicianVO {
    private Long id;

    /**
     * 技师姓名
     */
    private String name;

    /**
     * 技师编号
     */
    private String technicianNo;

    /**
     * 技师头像URL
     */
    private String avatar;

    /**
     * 评分
     */
    private BigDecimal rating;

    /**
     * 已服务单数
     */
    private Integer serviceCount;

    /**
     * 技师性别
     */
    private String gender;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    /**
     * 经度
     */
    private BigDecimal longitude;

    /**
     * 状态
     */
    private String status;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
    private Date updatedAt;
    /**
     * 距离
     */
    private Double distance;

    /**
     * 收藏标识
     */
    private Integer isFavorite;

    /**
     * 服务范围
     */
    private List<TechnicianServiceRanges> technicianRanges;
    /**
     * 服务类型
     */
    private List<Map<String, Object>> serviceSubCategory;
    /**
     * 技师可预约时间段
     */
    private TechnicianAvailability technicianAvailability;

    public TechnicianVO(Technician technician, List<TechnicianServiceRanges> technicianRanges, List<Map<String, Object>> serviceSubCategory,TechnicianAvailability technicianAvailability) {
        this.id = technician.getId();
        this.name = technician.getName();
        this.technicianNo = technician.getTechnicianNo();
        this.avatar = technician.getAvatar();
        this.rating = technician.getRating();
        this.serviceCount = technician.getServiceCount();
        this.gender = technician.getGender();
        this.mobile = technician.getMobile();
        this.latitude = technician.getLatitude();
        this.longitude = technician.getLongitude();
        this.status = technician.getStatus();
        this.createdAt = technician.getCreatedAt();
        this.updatedAt = technician.getUpdatedAt();
        this.technicianRanges = technicianRanges;
        this.serviceSubCategory = serviceSubCategory;
        this.technicianAvailability = technicianAvailability;

    }

    public TechnicianVO() {

    }


}
